import JSEncryptWX from './jsencrypt.js'
 
 
// 密钥对生成 http://web.chacuo.net/netrsakeypair
 
const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD\n' +
  '2iRe41HdTNF8RUhNnHit5NpMNtGL0NPTSSpPjjI1kJfVorRvaQerUgkCAwEAAQ=='
 
const privateKey = '秘钥'
 
// 加密
export function encrypt (txt) {
  let cryptFirst = new JSEncryptWX()
  cryptFirst.setPublicKey(publicKey)
  return cryptFirst.encrypt(txt) || ''
}
 